package com.xsd.rabbitmq.Consumer;

import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * @Description: 监听类
 * @Author: zhoufuzong
 * @Created: 2021-03-14 17:03:34
 * @Version: 1.1.0
 */
@Component
public class Mylistner {

    @RabbitListener(queues = "item_queue")
    public void msg(String msg){
        System.out.println("消费者-1消费消息了："+msg);
    }



    @RabbitListener(queues = "itemQueue")
    public void msg2(String msg){
        System.out.println("消费者-2消费消息了："+msg);
    }
}
